1. MAC-Layer Frame Structure (MPDU)

image-20191222160027401
图片 - image-20191222160027401

1.1. MAC Header (MHR) Fields

The MAC header consists of the Frame Control Field (FCF), a sequence number, and the addressing fields (which are of variable length, and can even be empty in certain situations).

1.2. Frame Control Field (FCF)

The FCF consists of 16 bits, and occupies the first two octets of the MPDU or PSDU, respectively.

IEEE 802.15.4-2006 Frame Control Field (FCF)
图片 - IEEE 802.15.4-2006 Frame Control Field (FCF)
  • Bit [2:0]: describes the frame type
Frame Type Value b2 b1 b0 Value Description
000 0 Beacon
001 1 Data
010 2 Acknowledge
011 3 MAC command
100 - 111 4-7 Reserved
  • Bit 3: indicates whether security processing applies to this frame.
  • Bit 4:

• Bit 4: is the "Frame Pending" subfield. This field can be set in an acknowledgment frame (ACK) in response to a data request MAC command frame. This bit indicates that the node, which transmitted the ACK, has more data to send to the node receiving the ACK. For acknowledgment frames automatically generated by the AT86RF231, this bit is set according to the content of register bit AACK_SET_PD in register 0x2E (CSMA_SEED_1) if the received frame was a data request MAC command frame.

  • Bit 5:

forms the "Acknowledgment Request" subfield. If this bit is set within a data or MAC command frame that is not broadcast, the recipient shall acknowledge the reception of the frame within the time specified by IEEE 802.15.4 (i.e. within 192 µs for non beacon-enabled networks). The radio transceiver parses this bit during RX_AACK mode and transmits an acknowledgment frame if necessary. In TX_ARET mode this bit indicates if an acknowledgement frame is expected after transmitting a frame. If this is the case, the receiver waits for the acknowledgment frame, otherwise the TX_ARET transaction is finished.

  • Bit [11:10]: the "Destination Addressing Mode" subfield describes the format of the destination address of the frame.
Addressing Mode Value Description
00 0 PAN identifier and address fields are not present
01 1 Reserved
10 2 Address field contains a 16-bit short address
11 3 Address field contains a 64-bit extended address

1.3. Sequence Number

The one-octet sequence number following the FCF identifies a particular frame, so that duplicated frame transmissions can be detected. While operating in RX_AACK mode, the content of this field is copied from the frame to be acknowledged into the acknowledgment frame.

1.4. Addressing Fields

The addressing fields of the MPDU are used by the AT86RF231 for address matching indication. The destination address (if present) is always first, followed by the source address (if present). Each address field consists of the Intra PAN ID and a device address. If both addresses are present, and the "Intra PAN-ID compression" subfield in the FCF is set to one, the source Intra PAN ID is omitted.

Note that in addition to these general rules, IEEE 802.15.4 further restricts the valid address combinations for the individual possible MAC frame types. For example, the situation where both addresses are omitted (source addressing mode = 0 and destination addressing mode = 0) is only allowed for acknowledgment frames. The address filter in the AT86RF231 has been designed to apply to IEEE 802.15.4 compliant frames. It can be configured to handle other frame formats and exceptions.

1.5. MAC Service Data Unit (MSDU)

This is the actual MAC payload. It is usually structured according to the individual frame type. A description can be found in IEEE 802.15.4-2006, section 5.5.3.2.

The MAC footer consists of a two-octet Frame Checksum (FCS)

Copyright © Zhang XiaoYuan 2019 all right reserved,powered by Gitbook该文件修订时间: 2020-02-05 13:26:50

results matching ""

    No results matching ""